<script type="text/javascript">
	history.pushState({page: 1}, 'title 1', '?page=1');

	history.pushState({page: 2}, 'title 2', '?page=2');

	history.replaceState({page: 3}, 'title 3', '?page=3');
	
	window.addEventListener('popstate', function(event) {
 	  console.log('location: ' + document.location);
	  console.log('state: ' + JSON.stringify(event.state));
	  console.log(event.state.title);
});
</script>

